home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel PPC / lib_test / animal.e next >
Encoding:
Text File  |  1996-06-13  |  735 b   |  39 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. deferred class ANIMAL
  5.  
  6. feature {ANY}
  7.    
  8.    cry is
  9.       deferred
  10.       end;
  11.    
  12.    reproduction(other: ANIMAL): ANIMAL is
  13.       require
  14.      other /= Void
  15.       do
  16.      Result := other;
  17.       end;
  18.    
  19.    fornicate_with(other: QUADRUPEDE): ANIMAL is
  20.       require
  21.      other /= Void
  22.       do
  23.      Result := other;
  24.       end;
  25.    
  26.    congratulation(other: ANIMAL) is
  27.       do
  28.      Current.cry;
  29.      std_output.put_string(" + ");
  30.          other.cry;
  31.          std_output.put_string(" = ");
  32.          Current.reproduction(other).cry;
  33.          std_output.put_new_line;
  34.       end;
  35.  
  36.    is_cat, is_dog: BOOLEAN is do end;
  37.  
  38. end -- ANIMAL
  39.